#if !defined(AFX_MANUALTABLE_H__D53D5EB4_9C4F_4216_9337_B2526D283CAB__INCLUDED_)
#define AFX_MANUALTABLE_H__D53D5EB4_9C4F_4216_9337_B2526D283CAB__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ManualTable.h : header file
//
#include "Util\MinButton.h"
#include "Util\MinLabel.h"

// Control Layer
class ITapeRemover;
// Process Layer
class IAutoManager;
class ITrsTapeRemover;
// Common Layer
class CDMControlCenter;
class CErrorCodeData;
class CTapeRemoverPosData;
class CSystemData;
class CModelData;

#define MAX_TAPEREMOVER_PUSH_SW	26
/////////////////////////////////////////////////////////////////////////////
// CManualTapeRemover dialog

class CManualTapeRemover : public CDialog
{
// Construction
private:

	ITapeRemover* m_lnkTapeRemover;
	ITrsTapeRemover* m_lnkTrsTapeRemover;
	
	CErrorCodeData* m_lnkErrorCodeData;
	CSystemData* m_lnkSystemData;
	CModelData* m_lnkModelData;
	CTapeRemoverPosData* m_lnkTapeRemoverPosData;
	
	void ErrorDisplay(int nErrorCode);
	BOOL m_bErrorDisplay;

	BOOL StartInitFlag;
	BOOL	m_bOldStatusPush[MAX_TAPEREMOVER_PUSH_SW];

public:
	UINT m_TimerID;
	BOOL m_TimerInitFlag;

	CManualTapeRemover(IAutoManager* pAM, CDMControlCenter* pDMCC,CWnd* pParent = NULL);   // standard constructor

// Dialog Data
	//{{AFX_DATA(CManualTapeRemover)
	enum { IDD = IDD_MANUAL_TAPEREMOVER };
	CMinButton	m_bTRTapeChuckDown;
	CMinButton	m_bTRTapeChuckUp;
	CMinButton	m_bTRTapeGuidDown2;
	CMinButton	m_bTRTapeGuidUp2;
	CMinButton	m_bTRTapeVacOn;
	CMinButton	m_bTRTapeVacOff;
	CMinButton	m_bTRWaferUnloading;
	CMinButton	m_bTRTapePress;
	CMinButton	m_bTRWaferLoading;
	CMinButton	m_bTRTapeGuidBack;
	CMinButton	m_bTRTapeGuidFor;
	CMinButton	m_bTRTapeStrip;
	CMinButton	m_bTRWaferDown;
	CMinButton	m_bTRWaferVacOn;
	CMinButton	m_bTRWaferVacOff;
	CMinButton	m_bTRWaferUp;
	CMinButton	m_bTRWaferJigVacOn;
	CMinButton	m_bTRWaferJigVacOff;
	CMinButton	m_bTRTapeUp;
	CMinButton	m_bTRTapeGuidUp;
	CMinButton	m_bTRTapeRollerUp;
	CMinButton	m_bTRTapeRollerDown;
	CMinButton	m_bTRTapeGuidDown;
	CMinButton	m_bTRTapeDown;
	CMinButton	m_bTRTapeCutterUp;
	CMinButton	m_bTRTapeCutterDown;
	CMinButton	m_bTRTapeClampUp;
	CMinButton	m_bTRTapeClampDown;
	CMinButton	m_bTRTapeAttachUp;
	CMinButton	m_bTRTapeAttachDown;
	CMinButton	m_bExit;
	//}}AFX_DATA


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CManualTapeRemover)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	void ButtonInitial();
	void ButtonUpdate();
	// Generated message map functions
	//{{AFX_MSG(CManualTapeRemover)
	virtual BOOL OnInitDialog();
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnDestroy();
	afx_msg void OnExit();
	afx_msg void OnTrWaferUp();
	afx_msg void OnTrWaferDown();
	afx_msg void OnTrTapeUp();
	afx_msg void OnTrTapeDown();
	afx_msg void OnTrTapeGuidUp();
	afx_msg void OnTrTapeGuidDown();
	afx_msg void OnTrTapeCutterUp();
	afx_msg void OnTrTapeCutterDown();
	afx_msg void OnTrTapeClampUp();
	afx_msg void OnTrTapeClampDown();
	afx_msg void OnTrTapeAttachUp();
	afx_msg void OnTrTapeAttachDown();
	afx_msg void OnTrTapeGuidRollerUp();
	afx_msg void OnTrTapeGuidRollerDown();
	afx_msg void OnTrWaferVacOn();
	afx_msg void OnTrWaferVacOff();
	afx_msg void OnTrWaferJigVacOn();
	afx_msg void OnTrWaferJigVacOff();
	afx_msg void OnTrTapeGuidFor();
	afx_msg void OnTrTapeGuidBack();
	afx_msg void OnTrTapeVacOn();
	afx_msg void OnTrTapeVacOff();
	afx_msg void OnTrTapeGuidUp2();
	afx_msg void OnTrTapeGuidDown2();
	afx_msg void OnTrTapeChuckUp();
	afx_msg void OnTrTapeChuckDown();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_MANUALTABLE_H__D53D5EB4_9C4F_4216_9337_B2526D283CAB__INCLUDED_)
